package com.xmy.cultivate.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.xmy.cultivate.entity.Course;
import com.xmy.cultivate.entity.Recruit;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xmy.cultivate.entity.RecruitList;
import com.xmy.cultivate.respons.RecruitAnalysisRs;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 招聘信息 服务类
 * </p>
 *
 * @author hpiggy
 * @since 2024-11-27
 */
public interface IRecruitService extends IService<Recruit> {

    public abstract IPage<Recruit> findAll(IPage<?> page, @Param(Constants.WRAPPER) Wrapper wrapper);

    public abstract List<RecruitList> countList(@Param("startDate") String startDate, @Param("endDate") String endDate);

    public abstract IPage<Recruit> dataCountTryJobDetail(IPage<?> page,  String startDate,  String endDate,  String inviterId, Integer recruitStatus);

    public abstract IPage<Recruit> oneDayCountDetail(IPage<?> page,  String inviterId, Integer recruitStatus);

    public abstract IPage<Recruit> oneDayCountTryJobDetail(IPage<?> page,  String inviterId, Integer recruitStatus);

    public boolean updateRecruit(String id, Integer status, String inviteDateTime, Integer resultStatus, String turnDownContent, Integer isArrive, Integer interviewStatus);

//    public abstract List<RecruitList> getRecruitCount(String startDate, String endDate, String recruitStatus);
public abstract List<RecruitList> getRecruitCount(String recruitStatus);

    public abstract List<RecruitList> getTryJobCount(String recruitStatus);

    public abstract List<RecruitList> getRecruitCountByWeek(String recruitStatus);

    public abstract List<RecruitList> getTryJobCountByWeek(String recruitStatus);

    public abstract IPage<Recruit> oneWeekCountDetail(IPage<?> page,  String inviterId, Integer recruitStatus);
    public abstract IPage<Recruit> oneWeekTryJobCountDetail(IPage<?> page,  String inviterId, Integer recruitStatus);

    public List<RecruitList> resumeData(String startDate, String endDate, String departmentId, String stationsId, String labourId, String type, String yearPart, String quarterNum, String dateType, String theirType, String subjectsId);

    public IPage<Recruit> resumeDataDetails(IPage<?> page,
                                            String startDate,
                                            String endDate,
                                            String departmentId,
                                            String stationsId,
                                            String labourId,
                                            String type,
                                            String inviterId,
                                            String yearPart,
                                            String quarterNum,
                                            String dateType,
                                            String recruitStatus,
                                            String theirType,
                                            String subjectsId
    );

    List<RecruitAnalysisRs> getRecruitAnalysisList(String yearPart,
                                                   String quarterNum,
                                                   String startDate,
                                                   String endDate,
                                                   String stationsId,
                                                   String departmentId,
                                                   String subjectsId,
                                                   String labourId,
                                                   String type,
                                                   String theirType
    );

    IPage<RecruitAnalysisRs> getRecruitAnalysisDetails(IPage<RecruitAnalysisRs> page,
                                                       String yearPart,
                                                       String quarterNum,
                                                       String startDate,
                                                       String endDate,
                                                       String stationsId,
                                                       String departmentId,
                                                       String subjectsId,
                                                       String labourId,
                                                       String gradeDetailsId,
                                                       String type,
                                                       String theirType
    );

    List<RecruitAnalysisRs> getTryJobAnalysisList(String yearPart,
                                                  String quarterNum,
                                                  String startDate,
                                                  String endDate,
                                                  String stationsId,
                                                  String departmentId,
                                                  String subjectsId,
                                                  String labourId,
                                                  String type,
                                                  String theirType
    );

    IPage<RecruitAnalysisRs> getTryJobAnalysisDetails(IPage<RecruitAnalysisRs> page,
                                                      String yearPart,
                                                      String quarterNum,
                                                      String startDate,
                                                      String endDate,
                                                      String stationsId,
                                                      String departmentId,
                                                      String subjectsId,
                                                      String labourId,
                                                      String gradeDetailsId,
                                                      String type,
                                                      String theirType
    );

    List<RecruitAnalysisRs> getTrialFormAnalysisList(String yearPart,
                                                     String quarterNum,
                                                     String startDate,
                                                     String endDate,
                                                     String stationsId,
                                                     String departmentId,
                                                     String subjectsId,
                                                     String labourId,
                                                     String type,
                                                     String theirType
    );

    IPage<RecruitAnalysisRs> getTrialFormAnalysisDetails(IPage<RecruitAnalysisRs> page,
                                                         String yearPart,
                                                         String quarterNum,
                                                         String startDate,
                                                         String endDate,
                                                         String stationsId,
                                                         String departmentId,
                                                         String subjectsId,
                                                         String labourId,
                                                         String gradeDetailsId,
                                                         String type,
                                                         String theirType
    );

    Integer getPersonType(Long recruitId);
}
